package admin

import database "hft/Database"

type RoomType struct {
	database.Base
	Name   string    `json:"name,omitempty" gorm:"unique;index"`
	Code   int       `json:"code,omitempty" gorm:"unique;index"`
	InShow bool      `json:"inShow,omitempty" gorm:"comment:是否进入搜索"`
	LouPan []*LouPan `json:"loupan,omitempty" gorm:"many2many:_loupan_room_type;foreignKey:ID;references:ID;constraint:OnDelete:CASCADE,OnUpdate:CASCADE"`
}

func (RoomType) TableName() string {
	return database.TableNameFormat("room_type")
}
